 <!Dcotype html>
 <html>
 <meta charset="utf-8">
 <head></head>
 <style>
 .picture{
 height:400px;
 border:1px solid red;
 }
#advertise{
height:800px;
width:100%;
display:none;
}
 </style>
 <script>
 setInterval(function(){myTimer()},1000);
 function myTimer(){
 
 var t=new Date().toLocaleTimeString();
 document.getElementById("timer").innerHTML=t;
 }
 
 var time;
 function init(){
 time=setInterval("show()",3000);
 }
 function show(){
 var img1=document.getElementById("advertise");
 img1.style.display="block";
 clearInterval(time);
 time=setInterval("hidden()",3000);
 }
 function hidden(){
 
 document.getElementById("advertise").style.display="none";
 clearInterval(time);
 }
 </script>
 <body onload="init()">
 <div class="picture">
 <p id="timer"></p>
<!--<img src="logo1.jpg" width="100%"/>-->
 <img src="logo2.jpg" id="advertise" height="400px" width="50%" style="display:none"/>
 </div>
<a href onmouseover="alert('哈哈哈')">点我</a> 

 </body>
 </html>